# Maintainer: David Runge <dvzrv@archlinux.org>

_name=Xmonk
pkgname=xmonk.lv2
pkgver=0.4
pkgrel=2
pkgdesc="A LV2 toy"
arch=(loong64 x86_64)
url="https://github.com/brummer10/Xmonk.lv2"
license=(BSD)
groups=(
  lv2-plugins
  pro-audio
)
depends=(
  cairo
  gcc-libs
  glibc
  libx11
)
makedepends=(lv2)
checkdepends=(lv2lint)
source=($url/releases/download/$pkgver/${_name}_$pkgver.tar.gz)
sha512sums=('c4dff2b0e5e8d3ac8b1daeec96f1a17466c99a542cc420aa2a0dee55dbd17b72dc7c8c37348b09cc9faf8a0ee67fa1fab566a0472a1960a46268618b06758f9e')
b2sums=('c15d01dfa772d4a677cedeb5131486d86c05a82fff2453a2b9c24b59588ebf0022029ab171405770d64f1cb72fff9f32c26e5526e47bb2633ffe2e6f4092d36c')

build() {
  make -C ${_name}_$pkgver
}

check() {
  lv2lint -Mpack -I ${_name}_$pkgver/$_name/$_name.lv2 "https://github.com/brummer10/Xmonk.lv2"
}

package() {
  make DESTDIR="$pkgdir/" install -C ${_name}_$pkgver
  install -vDm 644 ${_name}_$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 ${_name}_$pkgver/README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
